package com.geeguo.ebuilder.client.base.database.remote.fallback;

import com.geeguo.ebuilder.client.base.database.model.DataSourceInfoRO;
import com.geeguo.ebuilder.client.base.database.remote.DataSourceInfoApi;
import com.geeguo.ebuilder.core.common.action.ActionResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class DataSourceInfoApiFallback implements DataSourceInfoApi {

    @Override
    public ActionResult<DataSourceInfoRO> get(String id) {
        log.error("从运营中心获取数据源信息失败，数据源ID：" + id + "。");
        return ActionResult.fail("从运营中心获取数据源信息失败。");
    }
}